<!--
 * @Author: huangling
 * @Date: 2021-06-07 16:31:29
 * @LastEditTime: 2021-06-07 15:40:36
 * @Description: 研判信息：展示由研判和研判任务-反馈生成的数据。
-->
<template>
  <dg-row>
    <ModuleCard>
      <template v-slot:header>研判信息</template>
      <!-- TODO:按照研判时间倒叙排 -->
      <dg-table
        :data="data"
        overflow="tooltip"
        paging-type="client"
        :pagination-props="{
          pageSizes: [5, 10, 20],
          pageSize: 5
        }"
        :sorts="{prop:'ypsj',order:'descending'}"  
      >
      <!-- TODO:记得改排序 -->
        <dg-table-column type="index" label="序号" width="70"></dg-table-column>
        <dg-table-column prop="ypsj" label="研判时间"></dg-table-column>
        <dg-table-column prop="ypdw" label="研判单位" width="100"></dg-table-column>
        <dg-table-column prop="ypr" label="研判人" width="100"></dg-table-column>
        <dg-table-column prop="yplx" label="研判类型" width="100"></dg-table-column>
        <dg-table-column prop="ypnr" label="研判内容" width="100"></dg-table-column>
        <dg-table-column prop="fj" label="附件" width="100"></dg-table-column>
        <!--无数据-->
        <slot name="empty" slot="empty">
          <no-record></no-record>
        </slot>
      </dg-table>
    </ModuleCard>
  </dg-row>
</template>

<script>
import { BM_DEPT } from '@/common/codeDic';
import ModuleCard from '@/components/layout/module-card';
import { userInfoStatistic } from '@/api/common';   // TODO:接口出来再改

export default {
  name: 'involve-obj-statistics',
  components: { ModuleCard },
  data() {
    return {
      BM_DEPT,
      form: {},
      data: []
    };
  },
  mounted() {
    // 使用前端数据分页，采用url获取数据方式会报错  未排查出问题
    this.fetchData();
  },
  computed: {
    flowId() {
      return this.$route.params.id || '';
    }
  },
  methods: {
    onUpdateInfo(data) {
      this.form = data.signInVO;
    },
    fetchData() {
      let that_ = this;
      userInfoStatistic().then(res => {
        that_.data = res.data;
      });
    }
  }
};
</script>

<style></style>
